/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: 焦质晔
 * @Last Modified time: 2019-11-30 15:49:43
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 执行礼品采购退库单查询
export const queryGiftReturn = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/giftReturn/queryGiftReturn`, {
    params
  });

// 执行礼品采购退库单明细查询
export const getGiftReturnDetail = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/giftReturn/queryGiftReturnDetail`, {
    params
  });

// 删除记录
export const deleteById = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/giftReturn/deleteGiftReturn`, {
    params
  });

// 执行礼品采购入库单查询
export const getGiftPurchaseStorage = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/giftReturn/queryGiftPurchaseStorage`, {
    params
  });

// 保存或编辑礼品采购退库单
export const saveOrUpdateGiftReturn = params => axios.post(`${SERVER.MEMBERS_CLUB}/giftReturn/saveOrUpdateGiftReturn`, params);

// 保存或编辑礼品采购退库详情单
export const saveOrUpdateGiftReturnDetail = params => axios.post(`${SERVER.MEMBERS_CLUB}/giftReturn/saveOrUpdateGiftReturnDetail`, params);

// 执行礼品采购入库单查询
export const purchaseWithdrawal = params => axios.post(`${SERVER.MEMBERS_CLUB}/giftReturn/purchaseWithdrawal`, params);

// 查询库存中礼品清单
export const getGiftPage = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/gift/gift/giftInStock`, {
    params
  });

// 执行礼品采购入库单查询
export const queryGiftPurchaseStorageDetail = params =>
  axios.get(`${SERVER.MEMBERS_CLUB}/giftReturn/queryGiftPurchaseStorageDetail`, {
    params
  });
